#
# Makefile for some libs needed in the kernel.
#
# Note! Dependencies are done automagically by 'make dep', which also
# removes any old dependencies. DON'T put your own dependencies here
# unless it's something special (ie not a .c file).
#

AR	=gar
AS	=gas
LD	=gld
LDFLAGS	=-s -x
CC	=gcc
CFLAGS	=-Wall -O -fstrength-reduce -fomit-frame-pointer -fcombine-regs \
	-finline-functions -mstring-insns -nostdinc -I../../include
CPP	=gcc -E -I../../include

.c.s:
	$(CC) $(CFLAGS) \
	-S -o $*.s $<
.s.o:
	$(AS) -c -o $*.o $<
.c.o:
	$(CC) $(CFLAGS) \
	-c -o $*.o $<

OBJS  = yarray2D.o yhtml.o yinteger.o ylinkedList.o yoneWayList.o \
  ypropertiesFile.o ysortedList.o ystr.o

lib.a: $(OBJS)
	$(AR) rcs lib.a $(OBJS)
	sync

clean:
	rm -f core *.o *.a tmp_make
	for i in *.c;do rm -f `basename $$i .c`.s;done

dep:
	sed '/\#\#\# Dependencies/q' < Makefile > tmp_make
	(for i in *.c;do echo -n `echo $$i | sed 's,\.c,\.s,'`" "; \
		$(CPP) -M $$i;done) >> tmp_make
	cp tmp_make Makefile

### Dependencies:
yarray2D.s yarray2D.o: yarray2D.c /usr/include/stdio.h /usr/include/_ansi.h \
  /usr/include/newlib.h /usr/include/sys/config.h \
  /usr/include/machine/ieeefp.h /usr/include/cygwin/config.h \
  /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stddef.h \
  /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stdarg.h \
  /usr/include/sys/reent.h /usr/include/_ansi.h /usr/include/sys/_types.h \
  /usr/include/sys/lock.h /usr/include/sys/types.h \
  /usr/include/machine/_types.h /usr/include/machine/types.h \
  /usr/include/sys/features.h /usr/include/cygwin/types.h \
  /usr/include/sys/sysmacros.h /usr/include/stdint.h \
  /usr/include/endian.h /usr/include/sys/stdio.h /usr/include/sys/cdefs.h \
  ../../include/tool/yarray2D.h ../../include/tool/ydefine.h \
  /usr/include/stdlib.h /usr/include/machine/stdlib.h \
  /usr/include/alloca.h /usr/include/cygwin/stdlib.h \
  /usr/include/cygwin/wait.h
yhtml.s yhtml.o: yhtml.c /usr/include/ctype.h /usr/include/_ansi.h \
  /usr/include/newlib.h /usr/include/sys/config.h \
  /usr/include/machine/ieeefp.h /usr/include/cygwin/config.h \
  /usr/include/stdio.h /usr/include/_ansi.h \
  /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stddef.h \
  /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stdarg.h \
  /usr/include/sys/reent.h /usr/include/sys/_types.h \
  /usr/include/sys/lock.h /usr/include/sys/types.h \
  /usr/include/machine/_types.h /usr/include/machine/types.h \
  /usr/include/sys/features.h /usr/include/cygwin/types.h \
  /usr/include/sys/sysmacros.h /usr/include/stdint.h \
  /usr/include/endian.h /usr/include/sys/stdio.h /usr/include/sys/cdefs.h \
  /usr/include/string.h /usr/include/sys/string.h \
  ../../include/tool/yhtml.h ../../include/tool/ydefine.h \
  /usr/include/stdlib.h /usr/include/machine/stdlib.h \
  /usr/include/alloca.h /usr/include/cygwin/stdlib.h \
  /usr/include/cygwin/wait.h ../../include/tool/ystr.h
yinteger.s yinteger.o: yinteger.c /usr/include/stdio.h /usr/include/_ansi.h \
  /usr/include/newlib.h /usr/include/sys/config.h \
  /usr/include/machine/ieeefp.h /usr/include/cygwin/config.h \
  /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stddef.h \
  /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stdarg.h \
  /usr/include/sys/reent.h /usr/include/_ansi.h /usr/include/sys/_types.h \
  /usr/include/sys/lock.h /usr/include/sys/types.h \
  /usr/include/machine/_types.h /usr/include/machine/types.h \
  /usr/include/sys/features.h /usr/include/cygwin/types.h \
  /usr/include/sys/sysmacros.h /usr/include/stdint.h \
  /usr/include/endian.h /usr/include/sys/stdio.h /usr/include/sys/cdefs.h \
  /usr/include/string.h /usr/include/sys/string.h \
  ../../include/tool/yinteger.h ../../include/tool/ydefine.h \
  /usr/include/stdlib.h /usr/include/machine/stdlib.h \
  /usr/include/alloca.h /usr/include/cygwin/stdlib.h \
  /usr/include/cygwin/wait.h
ylinkedList.s ylinkedList.o: ylinkedList.c /usr/include/stdio.h /usr/include/_ansi.h \
  /usr/include/newlib.h /usr/include/sys/config.h \
  /usr/include/machine/ieeefp.h /usr/include/cygwin/config.h \
  /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stddef.h \
  /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stdarg.h \
  /usr/include/sys/reent.h /usr/include/_ansi.h /usr/include/sys/_types.h \
  /usr/include/sys/lock.h /usr/include/sys/types.h \
  /usr/include/machine/_types.h /usr/include/machine/types.h \
  /usr/include/sys/features.h /usr/include/cygwin/types.h \
  /usr/include/sys/sysmacros.h /usr/include/stdint.h \
  /usr/include/endian.h /usr/include/sys/stdio.h /usr/include/sys/cdefs.h \
  ../../include/tool/ylinkedList.h ../../include/tool/ydefine.h \
  /usr/include/stdlib.h /usr/include/machine/stdlib.h \
  /usr/include/alloca.h /usr/include/cygwin/stdlib.h \
  /usr/include/cygwin/wait.h
yoneWayList.s yoneWayList.o: yoneWayList.c /usr/include/stdio.h /usr/include/_ansi.h \
  /usr/include/newlib.h /usr/include/sys/config.h \
  /usr/include/machine/ieeefp.h /usr/include/cygwin/config.h \
  /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stddef.h \
  /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stdarg.h \
  /usr/include/sys/reent.h /usr/include/_ansi.h /usr/include/sys/_types.h \
  /usr/include/sys/lock.h /usr/include/sys/types.h \
  /usr/include/machine/_types.h /usr/include/machine/types.h \
  /usr/include/sys/features.h /usr/include/cygwin/types.h \
  /usr/include/sys/sysmacros.h /usr/include/stdint.h \
  /usr/include/endian.h /usr/include/sys/stdio.h /usr/include/sys/cdefs.h \
  ../../include/tool/yoneWayList.h ../../include/tool/ydefine.h \
  /usr/include/stdlib.h /usr/include/machine/stdlib.h \
  /usr/include/alloca.h /usr/include/cygwin/stdlib.h \
  /usr/include/cygwin/wait.h
ypropertiesFile.s ypropertiesFile.o: ypropertiesFile.c /usr/include/ctype.h \
  /usr/include/_ansi.h /usr/include/newlib.h /usr/include/sys/config.h \
  /usr/include/machine/ieeefp.h /usr/include/cygwin/config.h \
  /usr/include/stdio.h /usr/include/_ansi.h \
  /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stddef.h \
  /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stdarg.h \
  /usr/include/sys/reent.h /usr/include/sys/_types.h \
  /usr/include/sys/lock.h /usr/include/sys/types.h \
  /usr/include/machine/_types.h /usr/include/machine/types.h \
  /usr/include/sys/features.h /usr/include/cygwin/types.h \
  /usr/include/sys/sysmacros.h /usr/include/stdint.h \
  /usr/include/endian.h /usr/include/sys/stdio.h /usr/include/sys/cdefs.h \
  /usr/include/string.h /usr/include/sys/string.h \
  ../../include/tool/ysortedList.h ../../include/tool/ydefine.h \
  /usr/include/stdlib.h /usr/include/machine/stdlib.h \
  /usr/include/alloca.h /usr/include/cygwin/stdlib.h \
  /usr/include/cygwin/wait.h ../../include/tool/yoneWayList.h \
  ../../include/tool/ypropertiesFile.h ../../include/tool/ystr.h
ysortedList.s ysortedList.o: ysortedList.c /usr/include/stdio.h /usr/include/_ansi.h \
  /usr/include/newlib.h /usr/include/sys/config.h \
  /usr/include/machine/ieeefp.h /usr/include/cygwin/config.h \
  /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stddef.h \
  /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stdarg.h \
  /usr/include/sys/reent.h /usr/include/_ansi.h /usr/include/sys/_types.h \
  /usr/include/sys/lock.h /usr/include/sys/types.h \
  /usr/include/machine/_types.h /usr/include/machine/types.h \
  /usr/include/sys/features.h /usr/include/cygwin/types.h \
  /usr/include/sys/sysmacros.h /usr/include/stdint.h \
  /usr/include/endian.h /usr/include/sys/stdio.h /usr/include/sys/cdefs.h \
  ../../include/tool/ylinkedList.h ../../include/tool/ydefine.h \
  /usr/include/stdlib.h /usr/include/machine/stdlib.h \
  /usr/include/alloca.h /usr/include/cygwin/stdlib.h \
  /usr/include/cygwin/wait.h ../../include/tool/ysortedList.h
ystr.s ystr.o: ystr.c /usr/include/ctype.h /usr/include/_ansi.h \
  /usr/include/newlib.h /usr/include/sys/config.h \
  /usr/include/machine/ieeefp.h /usr/include/cygwin/config.h \
  /usr/include/stdio.h /usr/include/_ansi.h \
  /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stddef.h \
  /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stdarg.h \
  /usr/include/sys/reent.h /usr/include/sys/_types.h \
  /usr/include/sys/lock.h /usr/include/sys/types.h \
  /usr/include/machine/_types.h /usr/include/machine/types.h \
  /usr/include/sys/features.h /usr/include/cygwin/types.h \
  /usr/include/sys/sysmacros.h /usr/include/stdint.h \
  /usr/include/endian.h /usr/include/sys/stdio.h /usr/include/sys/cdefs.h \
  /usr/include/string.h /usr/include/sys/string.h \
  ../../include/tool/ystr.h ../../include/tool/ydefine.h \
  /usr/include/stdlib.h /usr/include/machine/stdlib.h \
  /usr/include/alloca.h /usr/include/cygwin/stdlib.h \
  /usr/include/cygwin/wait.h
